:root {
    --primary: #2d6df6;
    --bg: #ffffff;
    --border: #e4e7ed;
    --text: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background: #f5f7fb;
    height: 100vh;
    display: flex;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.chat-box {
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user .avatar {
    background: var(--primary);
    color: white;
}

.bot .avatar {
    background: #e8f0fe;
    color: var(--primary);
}

.content {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 15px;
}

.user .content {
    background: var(--primary);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.bot .content {
    background: #f8f9fa;
    color: var(--text);
    border-radius: 12px 12px 12px 4px;
}

.input-area {
    border-top: 1px solid var(--border);
    padding: 20px;
    display: flex;
    gap: 12px;
}

input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.1);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

pre {
    background: #f8f8f8 !important;
    padding: 16px !important;
    border-radius: 8px !important;
    overflow-x: auto;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    font-size: 14px;
}